using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._MosaicDataset
{
    /// <summary>
    /// <para>Compute Mosaic Candidates</para>
    /// <para>Finds the image candidates within in the mosaic dataset that best represents the mosaic area.</para>
    /// <para>在镶嵌数据集中查找最能代表镶嵌区域的候选影像。</para>
    /// </summary>    
    [DisplayName("Compute Mosaic Candidates")]
    public class ComputeMosaicCandidates : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ComputeMosaicCandidates()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Input mosaic dataset</para>
        /// <para>The input mosaic dataset with densely overlapped images.</para>
        /// <para>具有密集重叠图像的输入镶嵌数据集。</para>
        /// </param>
        public ComputeMosaicCandidates(object _in_mosaic_dataset)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Compute Mosaic Candidates";

        public override string CallName => "management.ComputeMosaicCandidates";

        public override List<string> AcceptEnvironments => ["parallelProcessingFactor", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _maximum_overlap, _maximum_area_loss, _out_mosaic_dataset];

        /// <summary>
        /// <para>Input mosaic dataset</para>
        /// <para>The input mosaic dataset with densely overlapped images.</para>
        /// <para>具有密集重叠图像的输入镶嵌数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input mosaic dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Maximum Area Overlap</para>
        /// <para><xdoc>
        ///   <para>The maximum amount of overlap that you want between the mosaic dataset and the footprint of each image in the mosaic dataset. If the percentage of overlap is higher than this threshold, the image is excluded since it will have too much redundant information.</para>
        ///   <para>The percentage is expressed as a decimal. For example, a maximum overlap of 60 percent is expressed as 0.6.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>镶嵌数据集与镶嵌数据集中每个影像的轮廓线之间所需的最大重叠量。如果重叠百分比高于此阈值，则排除图像，因为它将包含太多冗余信息。</para>
        ///   <para>百分比以小数表示。例如，60% 的最大重叠表示为 0.6。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Area Overlap")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _maximum_overlap { get; set; } = 0.6;


        /// <summary>
        /// <para>Maximum Area Loss Allowed</para>
        /// <para><xdoc>
        ///   <para>This is the maximum percentage of area that can be excluded by the candidate images. After the tool chooses the best candidate images based on the Maximum Area Overlap, it will then check to see if the maximum excluded area is below the threshold specified. If the excluded area is greater than the specified threshold, the tool will add more candidate images to fill in some of the voids that were missing. Most of these excluded areas will likely be along the border of the mosaic dataset.</para>
        ///   <para>The percentage is expressed as a decimal. For example, a maximum excluded area of 5 percent is expressed as 0.05.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>这是候选图像可以排除的最大区域百分比。该工具根据最大区域重叠选择最佳候选图像后，将检查最大排除区域是否低于指定的阈值。如果排除区域大于指定的阈值，该工具将添加更多候选图像以填充一些缺失的空白。这些排除区域中的大多数可能位于镶嵌数据集的边界上。</para>
        ///   <para>百分比以小数表示。例如，最大排除面积 5% 表示为 0.05。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Area Loss Allowed")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _maximum_area_loss { get; set; } = 0.05;


        /// <summary>
        /// <para>Derived Mosaic Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Derived Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_mosaic_dataset { get; set; }


        public ComputeMosaicCandidates SetEnv(object parallelProcessingFactor = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}